Advanced SQL Advertisements
Description:
I search in forums for something like this but nothing found. So i decided to make one! :P
With this plugin you can add some advertisements(dhud/chat/hud) into SQL and then to show them in-game. It's a simple plugin which will make your life easier for communities. It's a better way not to write the same things in .ini files.
Admin Commands:
PHP Code:
-asa_add_adv "type: chat/hud/dhud" "message" "red" "green" "blue"
It adds an advertisement in SQL
NOTE1: If the type is chat there is no need to add red, green,blue. 
NOTE2: Red, Green, Blue is values 0-255.
NOTE3: You can use colorchat: !g for green color, !t for team color and !n for yellow color.
-asa_del_adv "type: chat/hud/dhud" "message"
Deletes the advertisement from SQL with this type & name.
-asa_show_advs
Shows all advertisements in console
-asa_reload_advs
Reloads all advertisements
-say /advs
Opens a menu with all advertisements 
No CVARS Needed.
Plugin Customization:
PHP Code:
#define MAX_CHAT_MESSAGES 20 //Max chat messages in sql
#define MAX_HUD_MESSAGES 20 //Max hud messages in sql
#define MAX_DHUD_MESSAGES 20 //Max dhud messages in sql
#define ADMIN_FLAG ADMIN_BAN //Admin flag for commands
#define USE_PREFIX //define this if u don't want chat prefix
//MYSQL Database Attributes
new Host[]        = ""
new User[]        = ""
new Pass[]        = ""
new DB[]           = ""
new Table[]     = "asa_messages"
new const Float:MIN_TIME_CHAT = 60.0 //Min time to display chat messages
new const Float:MAX_TIME_CHAT = 80.0 //Max time to display chat messages
new const Float:MIN_TIME_HUD = 120.0 //Min time to display hud messages
new const Float:MAX_TIME_HUD = 160.0 //Max time to display hud messages
#if defined USE_PREFIX
new const saychatprefix[] = { "!g[!nAdvanced SQL Advs!g]!n" }
#endif 
- 1.0 - Release
 
TO DO:
- Add PHP Script for control advertisements via website(NOT DONE!)
 - Make the advertisements to be controllable via menu(NOT DONE!)
 
Installation:
Just add mysql, compile and add to plugins.ini.
No need any module or something like this.


 
Dodatki SourceMod



	






